import request from "@/utils/back-request";

export function getInfo(params) {
  return request({
    url: "/api-career/data/center/definition",
    method: "get",
    params,
  });
}

export function getQuestionList(params) {
  return request({
    url: "/api-career/data/center/getQuestionAnswerList",
    method: "get",
    params,
  });
}

export function saveInfo(params) {
  return request({
    url: "/api-career/data/center/save",
    method: "post",
    data: params,
  });
}
export function batchSaveAnswer(params) {
  return request({
    url: "/api-career/data/center/batchSaveAnswer",
    method: "post",
    data: params,
  });
}

export function saveAnswerInfo(params) {
  return request({
    url: "/api-career/data/center/saveAnswer?id=" + params.ylPositionId,
    method: "post",
    data: params,
  });
}
export function historyStat(params) {
  return request({
    url: "/api-career/data/center/historyStat",
    method: "post",
    data: params,
  });
}
export function getProfessionTreeByTitle(params) {
  return request({
    url: "/api-career/positionSalary/top/info",
    method: "post",
    data: params,
  });
}
// 添加收藏
export function addPositionCollect(params) {
  return request({
    url: "/api-career/position/rel/addPositionCollect",
    method: "post",
    data: params,
  });
}
// 删除收藏
export function delPositionCollect(params) {
  return request({
    url: "/api-career/position/rel/delPositionCollect",
    method: "post",
    data: params,
  });
}
// 判断收藏状态
export function judgeCollectStatus(params) {
  return request({
    url: "/api-career/data/center/position/detail",
    method: "post",
    data: params,
  });
}
// 职位详情页职业概述
export function homepageLayer(params) {
  return request({
    url: "/api-career/homepage/layer",
    method: "post",
    data: params,
  });
}
// 职位详情页职业头像/描述
export function homepageInfo(params) {
  return request({
    url: "/api-career/homepage/info",
    method: "post",
    data: params,
  });
}
// 通过二级维度id获取数据详情
export function homepageLayerData(params) {
  return request({
    url: "/api-career/homepage/layer/data",
    method: "post",
    data: params,
  });
}
// 通过二级维度id获取数据详情
export function homepageQuestion(params) {
  return request({
    url: "/api-career/homepage/question",
    method: "post",
    data: params,
  });
}
// 更新主要任务/相似职位/职业其他名称
export function valueListUpdate(params) {
  return request({
    url: "/api-career/value/list/update",
    method: "post",
    data: params,
  });
}
//只解析不保存
export function valueListAnalysis(params) {
  return request({
    url: "/api-career/value/analysis",
    method: "post",
    data: params,
  });
}
//更新keyValue维度数据
export function valueLayerValueAnalysis(params) {
  return request({
    url: "/api-career/value/map/update",
    method: "post",
    data: params,
  });
}

//专业（案例查询条件）
export function campusTags(params) {
  return request({
    url: "/api-career/campus/tags",
    method: "post",
    data: params,
  });
} //就业区域（案例查询条件）
export function campusRegions(params) {
  return request({
    url: "/api-career/campus/regions",
    method: "post",
    data: params,
  });
}
//就业案例查询
export function campusFiles(params) {
  return request({
    url: "/api-career/campus/files",
    method: "post",
    data: params,
  });
}

//新增/取消收藏
export function campusCollect(data) {
  return request({
    url: "/api-career/campus/collect",
    method: "post",
    data,
  });
}
//热门招聘省
export function chartHotcity(data) {
  return request({
    url: "/api-career/chart/hotCity",
    method: "post",
    data,
  });
}
//面试问答
export function campusQuestions(data) {
  return request({
    url: "/api-career/campus/questions",
    method: "post",
    data,
  });
}
//职业机会
export function reqChartJobs(data) {
  return request({
    url: "/api-career/chart/jobs",
    method: "post",
    data,
  });
}

//国家职业大典关联
export function reqCareerRel(data) {
  return request({
    url: "/api-career/data/center/career/rel",
    method: "post",
    data,
  });
}

//获取有效时间状态和时间
export function getDate(data) {
  return request({
    url: "/api-career/customer/user/get/saas/user/valid/date",
    method: "post",
    data,
  });
}
//获取维度解析json数据
export function getLayerAssemblyData(data) {
  return request({
    url: "/api-career/value/list/assembly/by/layer",
    method: "post",
    data,
  });
}
//获取维职业的上一级职业关联职业
export function getSuperiorPosition(data) {
  return request({
    url: "/api-career/homepage/superiorPosition",
    method: "post",
    data,
  });
}
